﻿@using News.Models.Database
@using News.Models
@using News.Controllers
@{
	NewsContext _newsContext = new NewsContext();
	var list = _newsContext.Categories.ToList();
}

<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>NewWebsite</title>
	<link rel="stylesheet" href="/css/index.css">
</head>

<body>
	<!--导航栏-->
	<div class="content">
		<div id="nav">
			<div class="nav_main">
				@{
					//为什么 as List<Category>此表才能渲染列表
					list = list as List<Category>;
					foreach (var item in list)
					{
						if (Public.now_cateId == item.CateId)
						{
							<a class="class_check" href="index.html?cateId=@item.CateId">@item.CateName</a>
						}
						else
						{
							<a href="index.html?cateId=@item.CateId">@item.CateName</a>
						}
					}
				}
				@*
				<a href="javascript:void(0)">互联网</a>
				<a href="javascript:void(0)">NBA</a>
				<a href="javascript:void(0)">汽车</a>
				<a href="javascript:void(0)">影视</a>
				<a href="javascript:void(0)">旅游</a>
				<a href="javascript:void(0)">科技</a>
				<a href="javascript:void(0)">农业</a>
				<a href="javascript:void(0)">房产</a>
				<a href="javascript:void(0)">国际</a>*@
				<input type="button" value="搜索" id="search">
				<input type="text" id="content" placeholder="请输入查找的内容">
			</div>
		</div>
		@*替换内容*@
		@RenderBody()



		@*<ul class="pagination">
		<li><a href="javascript:void(0)">«</a></li>
		<li><a class="active" href="javascript:void(0)">1</a></li>
		<li><a href="javascript:void(0)">2</a></li>
		<li><a href="javascript:void(0)">3</a></li>
		<li><a href="javascript:void(0)">4</a></li>
		<li><a href="javascript:void(0)">5</a></li>
		<li><a href="javascript:void(0)">6</a></li>
		<li><a href="javascript:void(0)">7</a></li>
		<li><a href="javascript:void(0)">»</a></li>
		</ul>*@

		<div class="footer">
			<p>
				<a href="javascript:void(0)">关于NewWebsite</a>
				|
				<a href="javascript:void(0)">诚聘英才</a>
				|
				<a href="javascript:void(0)">商务合作</a>
				|
				<a href="javascript:void(0)">法律声明</a>
				|
				<a href="javascript:void(0)">帮助中心</a>
				|
				<a href="javascript:void(0)">作者投稿</a>
				|

				<a href="javascript:void(0)">联系我们</a>
				|
				<a href="javascript:void(0)">友情链接</a>
			</p>
			<p>
				Copyright©www.newwebsite.com&nbsp;&nbsp;All&nbsp;&nbsp;Rights&nbsp;&nbsp;Reserved&nbsp;版权所有&nbsp;&nbsp;
				<a href="">京ICP备xxxxxxxx-2号</a>
			</p>
			<p>本站所收录新闻来源、社区话题、新闻评论均属其个人学习行为，不代表本站立场。</p>
		</div>
	</div>
	<script>

	</script>
</body>
@RenderSection("script", false);
</html>

@*<!DOCTYPE html>

<html>
<head>
    <meta name="viewport" content="width=device-width" />
    <title>@ViewBag.Title</title>
</head>
<body>
    <div>
        @RenderBody()
    </div>
</body>
</html>
*@